cameraControlSet
Type
command
Summary
Sets the properties of a camera control.
Syntax
cameraControlSet <controlName>, <propertyName>, <propertyValue>
Description
Use the cameraControlSet command to set properties of a camera control created using cameraControlCreate.
The propertyName is one of the following:
- "rect": the bounds of the control, relative to the top-left of the card. For example "0,0,100,100".
- "visible": set to true or false to determine whether the control should be displayed.
- "device": Specifies which camera device to use.
- "default":
- "front":
- "back":
- "videoDevice": Specifies the device to use for video input:
- "default": Use the default video input device.
- "front": (MacOS X, iOS, Android) Use the front-facing video input device (if available).
- "back": (MacOS X, iOS, Android) Use the rear-facing video input device (if available).
- "": No video recording - any recorded media file will have no video component.
- VideoDeviceID: Use the device identified by the given device ID. This should be taken from one of the entries in the "videoDevices" property.
- "audioDevice": Specifies the device to use for audio input:
- "default": Use the default audio input device.
- "": No audio recording - any recorded media file will have no audio component.
- AudioDeviceID: Use the device identified by the given device ID. This should be taken from one of the entries in the "audioDevices" property.
- "flashMode": Specifies whether or not to use the camera flash.
- "on": Always use the camera flash.
- "off": Never use the camera flash.
- "auto": Let the camera hardware decide whether or not to use the camera flash.
- "exposureMode": Specifies how the exposure of the camera should be adjusted.
- "locked": Don't adjust the camera exposure.
- "auto": Make an automatic adjustment to the camera exposure when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera exposure during capture.
- "focusMode": Specifies how the focus of the camera should be adjusted.
- "locked": Don't adjust the camera focus.
- "auto": Make an automatic adjustment to the camera focus when set.
- "autoSmooth": Make a gradual automatic adjustment to the camera focus when set.
- "macro": Make an automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "macroSmooth": Make a gradual automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "infinity": Set the camera focal point to the maximum distance. Typically used to photograph distant objects.
- "continuous": Make continuous automatic adjustments to the camera focus during capture.
- "continuousSmooth": Continuously adjust the focus making gradual changes that are less noticeable during video capture.
- "extended": Allows for a greater distance between the farthest & nearest objects that remain in focus.
- "whitebalanceMode": Specifies how the white-balance of the camera should be adjusted.
- "locked": Don't adjust the white-balance focus.
- "auto": Make an automatic adjustment to the camera white-balance when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera white-balance during capture.
- "qualityPreset" : Specifies which of the available preset camera quality settings to use.
- "minFrameRate" : Request that the camera not use a recording framerate lower than the given value. Set to zero to remove this restriction.
- "maxFrameRate" : Request that the camera not use a recording framerate higher than the given value. Set to zero to remove this restriction.
- "zoomFactor" : Specifies the magnification of the camera.
Parameters
Name | Type | Description |
---|---|---|
controlName | The name of the control. | |
propertyName | enum | The property to be set.
|
propertyValue | The value to set the property to. |
Examples
cameraControlSet tCamera, "visible", true
cameraControlSet "myFirstCamera", "device", "front"
Related
function: cameraControlGet, cameraControls, cameraControlTarget
command: cameraControlDelete, cameraControlDo, cameraControlCreate
Compatibility and Support
Introduced
LiveCode 7.1
OS
mac
windows
ios
android